<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:81:"/www/wwwroot/zaozao/public/../application/admin/view/community/community_set.html";i:1605083161;s:59:"/www/wwwroot/zaozao/application/admin/view/public/head.html";i:1597211856;}*/ ?>
<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>支付宝生活缴费系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" href="/static/admin/css/font.css">
	<link rel="stylesheet" href="/static/admin/css/xadmin.css">
	<!--<link rel="stylesheet" href="/static/admin/css/bootstrap.min.css">
	<link rel="stylesheet" href="/static/admin/js/bootstrap.min.js">-->
	
    <script src="/static/admin/js/jquery.min.js"></script>
    <script src="/static/admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/admin/js/xadmin.js"></script>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a><cite>后台管理</cite></a>
        <a><cite>物业管理系统</cite></a>
        <a><cite>小区配置</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="javascript:location.reload()" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so"  method="get" action="#">
          <input class="layui-input" placeholder="小区名称" name="community_name" id="community_name" <?php if(isset($community_name)): ?>value="<?php echo $community_name; ?>"<?php endif; ?>>
          <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
        </form>
      </div>
      <xblock>
        
        <span class="x-right" style="line-height:40px">共有数据：<?php echo $number; ?> 条</span>
      </xblock>
      <table class="layui-table">
        <thead>
          <tr>
            <th style="text-align: center; font-size: 16px;">小区名称</th>
            <th style="text-align: center; font-size: 16px;">楼栋数量</th>
            <th style="text-align: center; font-size: 16px;">微信商户ID</th>
            <th style="text-align: center; font-size: 16px;">水费单价</th>
            <th style="text-align: center; font-size: 16px;">电费单价</th>
            <th style="text-align: center; font-size: 16px;">支付宝缴费</th>
            <th style="text-align: center; font-size: 16px;">微信缴费</th>
            <?php if(\think\Session::get('usertype')=='0'): ?>
             <th style="text-align: center; font-size: 16px;">小区排序</th>
            <?php endif; ?>
            <th style="text-align: center; font-size: 16px;">操作</th>
          </tr>
        </thead>
        <tbody>
          <?php foreach($list as $val): ?>
          <tr>
            <td style="text-align: center;"><?php echo $val['community_name']; ?></td>
          
            <td style="text-align: center;"><?php echo $val['building_num']; ?></td>
            <td style="text-align: center;"><?php echo $val['sub_mch_id']; ?></td>
            <td style="text-align: center;"><?php echo $val['water']; ?>元/吨</td>
            <td style="text-align: center;"><?php echo $val['electric']; ?>元/度</td>
            
            <td style="text-align: center;">
                <?php if($val['is_support_alipay']=='1'): ?>开启<?php endif; if($val['is_support_alipay']=='0'): ?><span style="color:red">关闭</span><?php endif; ?>
            </td>
            <td style="text-align: center;">
                <?php if($val['is_support_wechat']=='1'): ?>开启<?php endif; if($val['is_support_wechat']=='0'): ?><span style="color:red">关闭</span><?php endif; ?>
            </td>
            <?php if(\think\Session::get('usertype')=='0'): ?>
            <td style="text-align: center;"><?php echo $val['sort']; ?></td>
            <?php endif; ?>
            <td class="td-manage" style="text-align: center;">
              
              <a title="配置打印机"  onclick="x_admin_show('配置打印机','<?php echo url('admin/community/printing'); ?>?id=<?php echo $val['id']; ?>',600,500)" href="javascript:;">
                <i class="layui-icon">&#xe614;</i>
              </a>
              <a onclick="payurl('<?php echo $val['id']; ?>')" title="缴费链接" href="javascript:;">
                  <i class="layui-icon">&#xe628;</i>
              </a>
              <?php if(\think\Session::get('usertype')=='0'): ?>
              <a title="小区排序"  onclick="x_admin_show('小区排序','<?php echo url('admin/community/psort'); ?>?id=<?php echo $val['id']; ?>',600,500)" href="javascript:;">
                <img src="/static/index/images/psort.png" style="width:12px;height:12px"/>
              </a>
              <a title="账单设置"  onclick="x_admin_show('账单设置','<?php echo url('billset'); ?>?id=<?php echo $val['id']; ?>',600,500)" href="javascript:;">
                <img src="/static/index/images/bill.png" style="width:16px;height:16px"/>
              </a>
               <?php endif; ?>
            </td>
          </tr>
          <?php endforeach; ?>
        </tbody>
      </table>
      <div class="page">
        <div>
        </div>
      </div>

    </div>
    <script>
      layui.use('laydate', function(){
        var laydate = layui.laydate;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
      });
      function payurl(id){
        layer.open({
          type: 1,
          skin: 'x-right', //样式类名
          closeBtn: 0, //不显示关闭按钮
          anim: 2,
          shadeClose: true, //开启遮罩关闭
          area: ['80%', '300px'],
          content: 
          '<div style="padding: 20px 100px; font-size:18px">'+
          '收银台收款：http://www.wuye.zfbzhsq.com/admin/h5alipay/cashierpay?community_id='+ id + '<br><br>'+
          '物业缴费：http://www.wuye.zfbzhsq.com/admin/h5pay/selectroom?community_id='+ id + '<br><br>'+
         '物业缴费2：http://www.wuye.zfbzhsq.com/admin/h5pay/selectroom2?community_id='+ id + '<br><br>'+
          '</div>'
        });
      }
      //二维码
      function twocode(url){
              layer.open({
              type: 2,
              title: '二维码',
              shadeClose: true,
              shade: 0.8,
              area: ['30%', '70%'],
              content: url //iframe的url
            });
      }
      //同步小区
      function synchronization(id) {
          var url = '<?php echo url("admin/community/synchronization"); ?>'
          $.post(url, {id: id}, function(r){
              if (r.info) {
                alert(r.info)
                location.reload()
              }else{
                alert(r.error)
                location.reload()  
              }
          })
        }

        function updateCommunityId($id){
            var url = '<?php echo url("admin/community/updateCommunityId"); ?>'
            $.post(url, {id: id}, function(r){
              if (r.info) {
                alert(r.info)
                location.reload()
              }else{
                alert(r.error)
                location.reload()  
              }
            })
        }
      //初始化小区
      function initialize(id){
          var url = '<?php echo url("admin/community/initialize"); ?>'
          $.post(url, {id: id}, function(r){
              if (r.info) {
                alert(r.info)
                location.reload()
              }else{
                alert(r.error)
                location.reload()  
              }
          }) 
      }
      //申请上线
      function basicservice(id){
          var url = '<?php echo url("admin/community/basicservice"); ?>'
          $.post(url, {id: id}, function(r){
              console.log(r);
              if (r.info) {
                alert(r.info)
                location.reload()  
              }else{
                alert(r.error)
                location.reload()  
              }
          })
      }
      
    </script>
    <script>var _hmt = _hmt || []; (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();</script>


  </body>

</html>